<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="layout" content="bocMain"/>
    <title>进件作业系统</title>
</head>

<body>

<header class="header-title">信用卡分期付款业务资信核查表</header>

<div>

    <g:form action="businessCreditVerification1Save" class="myForm">

        <input type="hidden" name="id" id="id" value="${this?.opportunity?.id}">

        <div class="weui-cells weui-cells_form weui-label-10">

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">经办行</label></div>

                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="accountName" name="accountName" placeholder="经办行" value="${this?.opportunity?.user?.account?.name}" readonly="true"></g:textField>
                </div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">经办行客户经理</label></div>

                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="contactFullName" name="contactFullName" placeholder="经办行客户经理" value="${this?.opportunity?.user?.fullName}" readonly="true"></g:textField>
                </div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">EHR</label></div>

                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="username" name="username" placeholder="EHR" value="${this?.opportunity?.user?.username}" readonly="true"></g:textField>

                </div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">分期产品类型</label></div>

                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="productName" name="productName" placeholder="分期产品类型" value="${this?.opportunity?.product?.name}" readonly="true"></g:textField>

                </div>
            </div>

            <div class="weui-cell">
                <div class="weui-cell__hd"><label class="weui-label">客户姓名</label></div>

                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="userFullName" name="userFullName" placeholder="客户姓名" value="${this?.opportunity?.contact?.fullName}" readonly="true"></g:textField>
                </div>
            </div>

            <div class="weui-cell ">
                <div class="weui-cell__hd"><label class="weui-label">订单号</label></div>

                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="serialNumber" name="serialNumber" placeholder="订单号" value="${this?.opportunity?.serialNumber}" readonly="true"></g:textField>
                </div>
            </div>

            <div class="weui-cells__title">一、系统核查联系电话</div>
            <g:each in="${com.next.OpportunityFlexField.findAllByCategory(com.next.OpportunityFlexFieldCategory.findByOpportunityAndFlexFieldCategory(opportunity, com.next.FlexFieldCategory.findByName('系统核查联系电话')), [order:'asc', sort: 'displayOrder'])}">
                
                <g:if test="${it?.displayType == 'select'}">
                    <div class="weui-cell weui-cell_select weui-cell_select-after">
                        <div class="weui-cell__hd"><label class="weui-label" style="width: 15rem">${it?.name}</label></div>
                        <div class="weui-cell__bd">
                            <g:select class="weui-select" id="${it?.name}" name="${it?.name}" from="${it?.values*.value}" value="${it?.value}" noSelection="${['': '请选择']}"/>
                        </div>
                    </div>
                </g:if>
                
                <g:if test="${it?.displayType == 'checkbox'}">
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <g:checkBox id="${it?.name}" name="${it?.name}" class="weui-agree__checkbox" value="${item.value}" checked="${it?.value?.contains(item?.value)}"/> <span>${item.value}</span>
                            </g:each>
                            <br>
                        </div>
                    </div>
                </g:if>

                <g:if test="${it?.displayType == 'radio'}">
                    <div class="weui-cell ">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <input type="radio" name="${it?.name}" style="border-radius: 50%" class="weui-agree__checkbox" value="${item?.value}"/> <span>${item?.value}</span>
                            </g:each>
                        </div>
                    </div>
                </g:if>

            </g:each>

            <div class="weui-cells__title">二、电话核查</div>

            <div class="weui-cells__title" style="color: #999;font-weight: normal">1.申请人配偶信息</div>

            <div class="weui-cell ">
                <div class="weui-cell__hd"><label class="weui-label">配偶姓名</label></div>
                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="spouseName" name="spouseName" placeholder="请填写" value="${com.next.OpportunityContact.findByOpportunityAndConnectedType(opportunity, com.next.OpportunityContactType.findByName('配偶'))?.contact?.fullName}" readonly="true"></g:textField>
                </div>
            </div>

            <div class="weui-cell ">
                <div class="weui-cell__hd"><label class="weui-label">手机号码</label></div>
                <div class="weui-cell__bd">
                    <g:textField class="weui-input" id="spouseCellphone" name="spouseCellphone" placeholder="请填写" value="${com.next.OpportunityContact.findByOpportunityAndType(opportunity, com.next.OpportunityContactType.findByName('配偶'))?.contact?.cellphone}" readonly="true"></g:textField>
                </div>
            </div>

            <g:each in="${com.next.OpportunityFlexField.findAllByCategory(com.next.OpportunityFlexFieldCategory.findByOpportunityAndFlexFieldCategory(opportunity, com.next.FlexFieldCategory.findByName('电话核查')), [order:'asc', sort: 'displayOrder'])}">
                
                <g:if test="${it?.displayType == 'select'}">
                    <div class="weui-cell weui-cell_select weui-cell_select-after">
                        <div class="weui-cell__hd"><label class="weui-label" style="width: 15rem">${it?.name}</label></div>
                        <div class="weui-cell__bd">
                            <g:select class="weui-select" id="${it?.name}" name="${it?.name}" from="${it?.values*.value}" value="${it?.value}" noSelection="${['': '请选择']}"/>
                        </div>
                    </div>
                </g:if>
                
                <g:if test="${it?.displayType == 'checkbox'}">
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <g:checkBox id="${it?.name}" name="${it?.name}" class="weui-agree__checkbox" value="${item.value}" checked="${it?.value?.contains(item?.value)}"/> <span>${item.value}</span>
                            </g:each>
                            <br>
                        </div>
                    </div>
                </g:if>

                <g:if test="${it?.displayType == 'radio'}">
                    <div class="weui-cell ">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <input type="radio" name="${it?.name}" style="border-radius: 50%" class="weui-agree__checkbox" value="${item?.value}"/> <span>${item?.value}</span>
                            </g:each>
                        </div>
                    </div>
                </g:if>

            </g:each>

            <div class="weui-cells__title">三、客户材料核查</div>

            <g:each in="${com.next.OpportunityFlexField.findAllByCategory(com.next.OpportunityFlexFieldCategory.findByOpportunityAndFlexFieldCategory(opportunity, com.next.FlexFieldCategory.findByName('客户材料核查')), [order:'asc', sort: 'displayOrder'])}">

                <g:if test="${it?.displayType == 'select'}">
                    <div class="weui-cell weui-cell_select weui-cell_select-after">
                        <div class="weui-cell__hd"><label class="weui-label" style="width: 15rem">${it?.name}</label></div>
                        <div class="weui-cell__bd">
                            <g:select class="weui-select" id="${it?.name}" name="${it?.name}" from="${it?.values*.value}" value="${it?.value}" noSelection="${['': '请选择']}"/>
                        </div>
                    </div>
                </g:if>
                
                <g:if test="${it?.displayType == 'checkbox'}">
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <g:checkBox id="${it?.name}" name="${it?.name}" class="weui-agree__checkbox" value="${item.value}" checked="${it?.value?.contains(item?.value)}"/> <span>${item.value}</span>
                            </g:each>
                            <br>
                        </div>
                    </div>
                </g:if>

                <g:if test="${it?.displayType == 'radio'}">
                    <div class="weui-cell ">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <input type="radio" name="${it?.name}" style="border-radius: 50%" class="weui-agree__checkbox" value="${item?.value}"/> <span>${item?.value}</span>
                            </g:each>
                        </div>
                    </div>
                </g:if>

            </g:each>

            <div class="weui-cells__title">四、 家访核查（根据产品政策要求选填）</div>
            <g:each in="${com.next.OpportunityFlexField.findAllByCategory(com.next.OpportunityFlexFieldCategory.findByOpportunityAndFlexFieldCategory(opportunity, com.next.FlexFieldCategory.findByName('家访核查')), [order:'asc', sort: 'displayOrder'])}">
                
                <g:if test="${it?.displayType == 'select'}">
                    <div class="weui-cell weui-cell_select weui-cell_select-after">
                        <div class="weui-cell__hd"><label class="weui-label" style="width: 15rem">${it?.name}</label></div>
                        <div class="weui-cell__bd">
                            <g:select class="weui-select" id="${it?.name}" name="${it?.name}" from="${it?.values*.value}" value="${it?.value}" noSelection="${['': '请选择']}"/>
                        </div>
                    </div>
                </g:if>
                
                <g:if test="${it?.displayType == 'checkbox'}">
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <g:checkBox id="${it?.name}" name="${it?.name}" class="weui-agree__checkbox" value="${item.value}" checked="${it?.value?.contains(item?.value)}"/> <span>${item.value}</span>
                            </g:each>
                            <br>
                        </div>
                    </div>
                </g:if>

                <g:if test="${it?.displayType == 'radio'}">
                    <div class="weui-cell ">
                        <div class="weui-cell__hd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__bd agree-group" style="text-align: right">
                            <g:each in="${it?.values}" var="item">
                                <input type="radio" name="${it?.name}" style="border-radius: 50%" class="weui-agree__checkbox" value="${item?.value}"/> <span>${item?.value}</span>
                            </g:each>
                        </div>
                    </div>
                </g:if>

            </g:each>


            <div class="weui-cells__title">五、客户经理意见</div>

            <div class="" style="font-size: 1.2rem">
                <p style="font-size: 1.2rem">本人已认真对客户的财力资质、相关所有权证明的真实性和有效性进行了审核，认为该客户收入水平与申请综合授信金额匹配，信用情况良好，能够偿还该笔信用卡欠款。
                同意借款人申请${opportunity?.product?.name}额度${opportunity?.maximumAmountOfCredit?opportunity?.maximumAmountOfCredit/10000:0}万元，期数${opportunity?.loanDuration}期，费率${opportunity?.ompositeMonthlyInterest?opportunity?.ompositeMonthlyInterest*100:0}%。</p>
                <p style="margin-top: 1rem">客户经理签名：${opportunity?.user?.fullName}</p>
                <p>联系电话：${opportunity?.user?.cellphone}</p>
                <p>日期：${new Date()?.format("yyyy-MM-dd")}</p>
            </div>
        </div>
        <div class="bigBtn weui-flex">
            <button type="button" class="weui-btn weui-btn_primary" id="downMe" style="margin-top: 15px;margin-right: 10px;">拒绝</button>
            <button type="submit" class="weui-btn weui-btn_primary" id="submit">下一步</button>
        </div>

    </g:form>
</div>

<script>
    $(function ()
    {

        $(".selecList").delegate(".1.是否已家访", "click", function () {
            alert("dddd");

        });

        $('#1.是否已家访').change(function()
        {
            alert("dd");
            if($(this).val().trim() == "是")
            {
                $('#homeAddressDiv').removeClass("hide");
            }
            else
            {
                $('#homeAddressDiv').addClass("hide");
            }
        })

    });

</script>
</body>
</html>
